export const regularFun = (name, text) => {
	if (name === '' || name === null || !name) {
		uni.showToast({
			title: `${text}不能为空`,
			duration: 2000,
			icon: 'none'
		});
		return false
	}
	return true
}

export const regularPhone = (phone) => {
	if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))) {
		uni.showToast({
			title: `请填写正确的手机号`,
			duration: 2000,
			icon: 'none'
		});
		return false
	}
	return true
}

export const regularWx = (wx) => {
	if ((/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi).test(wx) || wx=="") {
		uni.showToast({
			title: `请填写正确的微信id`,
			duration: 2000,
			icon: 'none'
		});
		return false
	}
	return true
}
